<?php
namespace app\model\admin;

use think\Db;

class Users
{
    //获取会员列表
    public function get_users_lists($where,$sort='',$paginate=10)
    {
        $result_lists = Db::name('users')->where($where)->order($sort)->paginate($paginate);
        return $result_lists;
    }

    //会员详情
    public function users_detail($users_id){
        $result = Db::name('users')->where('id',$users_id)->find();
        return $result;
    }

    //会员添加
    public function add_users($data){
        $status = Db::name('users')->insert($data);
        return $status;
    }

    //会员信息修改
    public function update_users($where,$data){
        $status = Db::name('users')->where($where)->update($data);
        return $status;
    }

    //会员删除
    public function delete_users($array_id){
        $advert_delete = Db::name('users')->delete($array_id);
        return $advert_delete;
    }

}


